//
//  ShadowMatrix.h
//  SIO2_SDK_PVRTC_StaticLibProject
//
//  Created by Goffredo Marocchi on 8/3/10.
//  Copyright 2010 IGGS. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "sio2.h"

//ROW MAJOR ORDER
#define M4r(m,i,j) (m[(i*4)+j])  
#define M4c(m,i,j) (m[i+(j*4)])

@interface ShadowMatrix : NSObject {

	float m_shadow[16]; //holds the pre-calculated shadow matrix;
	SIO2object* objShadowReceiver[MAX_SHADOW_RECEIVERS];
}
@property (assign) vec3 planeNormal;
@property (assign) vec3 lightPos;
@property (assign) vec3 lightDir;
@property (assign) vec4 shadowColor;
@property (readonly) const float * m_shadow;
@property (assign) SIO2lamp* lampObj;

-(id) initWithLight:(SIO2lamp*)lamp;
-(void) setUpShadowMatrix:(const char*)objName; 
-(void) calculateMatrix;
-(void) renderPlanarShadows;
-(void) setObjShadowReceiver:(SIO2object **)obj;

@end
